﻿using System;

namespace LeanApp.Model.Assist
{
    /// <summary>
    /// spc分组样本
    /// </summary>
    public class SpcGroupSample
    {
        /// <summary>
        /// 边界序号
        /// </summary>
        public int Index { get; set; } = 1;
        /// <summary>
        /// 边界小值
        /// </summary>
        public double MinBoundary { get; set; } = 0;
        /// <summary>
        /// 边界大值
        /// </summary>
        public double MaxBoundary { get; set; } = 0;

        /// <summary>
        /// 该边界内样本数
        /// </summary>
        public int ItemQty { get; set; } = 0;

        /// <summary>
        /// 组内频率
        /// </summary>
        public double GroupRatio { get; set; } = 0;

        /// <summary>
        /// 组边距标签
        /// </summary>
        public string GroupTag
        {
            get
            {
                return "(" + Math.Round(MinBoundary, 3).ToString() + "," + Math.Round(MaxBoundary, 3).ToString() + ")";
            }
        }
    }
}
